package pac;

import java.io.File;

public class dele {
    public static void main(String[] args) {
        File file = new File("D://a");
        delefile(file);
    }

    public static void delefile(File dele){
        File[] files = dele.listFiles();
        for (File file : files) {
            if (file.isFile()){
                file.delete();
            }else{
                delefile(file);
            }
        }
        dele.delete();
    }
}
